package com.zhao.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 评论表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    @TableId(type = IdType.AUTO)
    private Integer id;         //评论id
	private Integer articleId; //文章id
    private Integer father;        //父节点
    private double idx;
	private String ip;          //评论这IP
    private String content;     //论内容
    private String author;      //评论作者
    private String bauthor;     //被评论
    private String ipHome;
    @TableLogic //逻辑删除注解
    private Integer deleted;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private String avatar;   //头像地址
    @TableField(exist = false)
    private List<Comment> sons;   //子评论
}
